<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Extended memory</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Extended_memory"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Extended_memory rootpage-Extended_memory skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Extended memory</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p class="mw-empty-elt">
</p>
<p>In <a href="DOS_memory_management" title="DOS memory management">DOS memory management</a>, <b>extended memory</b> refers to <a href="Computer_memory" title="Computer memory">memory</a> above the first <a href="Megabyte" title="Megabyte">megabyte</a> (2<sup>20</sup> bytes) of <a href="Address_space" title="Address space">address space</a> in an <a href="IBM_PC" class="mw-redirect" title="IBM PC">IBM PC</a> or compatible with an <a href="Intel_80286" title="Intel 80286">80286</a> or later <a href="Central_processing_unit" title="Central processing unit">processor</a>. The term is mainly used under the <a href="DOS" title="DOS">DOS</a> and <a href="Microsoft_Windows" title="Microsoft Windows">Windows</a> <a href="Operating_system" title="Operating system">operating systems</a>. DOS programs, running in <a href="Real_mode" title="Real mode">real mode</a> or <a href="Virtual_x86_mode" class="mw-redirect" title="Virtual x86 mode">virtual x86 mode</a>, cannot directly access this memory, but are able to do so through an <a href="Application_programming_interface" class="mw-redirect" title="Application programming interface">application programming interface</a> (API) called the <i><a href="#XMS">Extended Memory Specification</a></i> (XMS). This API is implemented by a <a href="Device_driver" title="Device driver">driver</a> (such as <a href="HIMEM.SYS" title="HIMEM.SYS">HIMEM.SYS</a>) or the operating system kernel, which takes care of <a href="Memory_management" title="Memory management">memory management</a> and copying memory between <a href="Conventional_memory" title="Conventional memory">conventional</a> and extended memory, by temporarily switching the processor into <a href="Protected_mode" title="Protected mode">protected mode</a>. In this context, the term "extended memory" may refer to either the whole of the extended memory or only the portion available through this API.
</p><p>Extended memory can also be accessed directly by DOS programs running in protected mode using <a href="Virtual_Control_Program_Interface" title="Virtual Control Program Interface">VCPI</a> or <a href="DOS_Protected_Mode_Interface" title="DOS Protected Mode Interface">DPMI</a>, two (different and incompatible) methods of using protected mode under DOS.
</p><p>Extended memory should not be confused with <a href="Expanded_memory" title="Expanded memory">expanded memory</a> (EMS), an earlier method for expanding the IBM PC's memory capacity beyond 640 kB (655,360 bytes) using an <a href="Expansion_card" title="Expansion card">expansion card</a> with <a href="Bank_switching" title="Bank switching">bank switched</a> memory modules. Because of the available support for expanded memory in popular applications, device drivers were developed that emulated expanded memory using extended memory. Later two additional methods were developed allowing direct access to small portions of additional memory above 640 KB from real mode. One of these is referred to as the <a href="High_memory_area" title="High memory area">high memory area</a> (HMA), consisting of the first nearly 64 KB of extended memory, and the other is referred to as the <a href="Upper_memory_area" title="Upper memory area">upper memory area</a> (UMA; also referred to as upper memory blocks or UMBs), located in the address range between 640 KB and 1 MB which the IBM PC designates for hardware adapters and ROM.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Overview">Overview</h2></div>
<p>On <a href="X86" title="X86">x86</a>-based PCs, extended memory is only available with an <a href="Intel_80286" title="Intel 80286">Intel 80286</a> processor or higher, such as the <a href="IBM_PC_AT" class="mw-redirect" title="IBM PC AT">IBM PC AT</a>.<sup id="cite_ref-Mendelson_1989_1-0" class="reference"><a href="#cite_note-Mendelson_1989-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Only these chips can directly address more than 1 megabyte of <a href="Random-access_memory" title="Random-access memory">RAM</a>. The earlier <a href="Intel_8086" title="Intel 8086">8086</a>/<a href="Intel_8088" title="Intel 8088">8088</a> processors can make use of more than 1 MB of RAM if one employs <a href="Bank_switching" title="Bank switching">special hardware</a> to make selectable parts of it appear at addresses below 1 MB.
</p><p>On a 286 or better PC equipped with more than 640 kB of RAM, the additional memory would generally be re-mapped above the 1 MB boundary, since the IBM PC architecture reserves addresses between 640 kB and 1 MB for system ROM and peripherals.
</p><p>Extended memory is not accessible in <a href="Real_mode" title="Real mode">real mode</a> (except for a small portion called the <a href="High_memory_area" title="High memory area">high memory area</a>). Only applications executing in <a href="Protected_mode" title="Protected mode">protected mode</a> can use extended memory directly. A supervising protected-mode <a href="Operating_system" title="Operating system">operating system</a> such as <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a> manages application programs' access to memory. The processor makes this memory available through the <a href="Global_Descriptor_Table" title="Global Descriptor Table">Global Descriptor Table</a> (GDT) and one or more <a href="Local_Descriptor_Table" class="mw-redirect" title="Local Descriptor Table">Local Descriptor Tables</a> (LDTs). The memory is "protected" in the sense that memory segments assigned a local descriptor cannot be accessed by another program because that program uses a different LDT, and memory segments assigned a global descriptor can have their access rights restricted, causing a processor <a href="Exception_handling" title="Exception handling">exception</a> (e.g., a <a href="General_protection_fault" title="General protection fault">general protection fault</a> or GPF) on violation. This prevents programs running in protected mode from interfering with each other's memory.<sup id="cite_ref-FOLDOC_2-0" class="reference"><a href="#cite_note-FOLDOC-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p><p>Extended memory went unused at first because no software ran in the 80286's protected mode. By contrast, the industry quickly adopted 1985's <a href="Expanded_memory" title="Expanded memory">expanded memory</a> standard, which works with all PCs regardless of processor.<sup id="cite_ref-Mendelson_1989_1-1" class="reference"><a href="#cite_note-Mendelson_1989-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> A protected-mode operating system such as Microsoft Windows can also run real-mode programs and provide expanded memory to them. The <a href="DOS_Protected_Mode_Interface" title="DOS Protected Mode Interface">DOS Protected Mode Interface</a> (DPMI) is Microsoft's prescribed method for a <a href="DOS" title="DOS">DOS</a> program to access extended memory under a <a href="Computer_multitasking" title="Computer multitasking">multitasking</a> environment.<sup id="cite_ref-FOLDOC_2-1" class="reference"><a href="#cite_note-FOLDOC-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Extended_Memory_Specification_(XMS)"><i>Extended Memory Specification</i> (XMS)</h2></div>
<p>The <i><b>Extended Memory Specification</b></i> (<b>XMS</b>) is the specification describing the use of <a href="IBM_PC" class="mw-redirect" title="IBM PC">IBM PC</a> extended memory in <a href="Real_mode" title="Real mode">real mode</a> for storing data (but not for running executable code in it). Memory is made available by <b>extended memory manager</b> (<b>XMM</b>) software such as <a href="HIMEM.SYS" title="HIMEM.SYS">HIMEM.SYS</a>. The XMM functions are accessible by direct calls to a variable address that can be found through <a href="Software_interrupt" class="mw-redirect" title="Software interrupt">software interrupt</a> 2Fh function 4310h.
</p><p>XMS version 2.0, released in July 1988, allowed for up to 64 MB of memory.<sup id="cite_ref-XMS2_3-0" class="reference"><a href="#cite_note-XMS2-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> With XMS version 3.0 this increased to 4 GB (2<sup>32</sup> bytes).<sup id="cite_ref-XMS3_4-0" class="reference"><a href="#cite_note-XMS3-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> The difference is a direct result of the sizes of the values used to report the amounts of total and unallocated (free) extended memory in 1 KB (1024-byte) units: XMS 2.0 uses 16-bit unsigned integers, capable of representing a maximum of (65535 * 1 KB) = 64 MB, while XMS 3.0 adds new alternate functions that use 32-bit unsigned integers, capable of representing (4 G * 1 KB) = 4 TB (4 terabytes) but limited by the specification to 4 GB.<sup id="cite_ref-XMS2_3-1" class="reference"><a href="#cite_note-XMS2-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-XMS3_4-1" class="reference"><a href="#cite_note-XMS3-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> (4 GB is the address range of the 80386 and the 80486, the only 32-bit Intel x86 CPUs that existed when XMS 3.0 was published in 1991.) XMS 3.0 retains the original XMS 2.0 API functions with their original 64 MB limit but adds new "super extended memory" functions that support 4 GB of extended memory (minus the first 1 MB) and can be called only with a 32-bit CPU (since these "super" functions use 32-bit CPU registers to pass values).<sup id="cite_ref-XMS3_4-2" class="reference"><a href="#cite_note-XMS3-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> To differentiate between the possibly different amount of memory that might be available to applications, depending on which version of the specification they were developed to, the latter may be referred to as <b>super extended memory</b> (<b>SXMS</b>).
</p><p>The extended memory manager is also responsible for managing allocations in the <a href="High_memory_area" title="High memory area">high memory area</a> (HMA) and the <a href="Upper_memory_area" title="Upper memory area">upper memory area</a> (UMA; also referred to as upper memory blocks or UMBs). In practice the upper memory area will be provided by the <a href="Expanded_memory" title="Expanded memory">expanded memory</a> manager (EMM), after which DOS will try to allocate them all and manage them itself.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="DOS_memory_management" title="DOS memory management">DOS memory management</a></li>
<li><a href="Conventional_memory" title="Conventional memory">Conventional memory</a></li>
<li><a href="Expanded_memory" title="Expanded memory">Expanded memory</a> (EMS)</li>
<li><a href="High_memory_area" title="High memory area">High memory area</a> (HMA)</li>
<li><a href="Upper_memory_area" title="Upper memory area">Upper memory area</a> (UMA)</li>
<li><a href="Global_EMM_Import_Specification" class="mw-redirect" title="Global EMM Import Specification">Global EMM Import Specification</a> (GEMMIS)</li>
<li><a href="Unreal_mode" title="Unreal mode">Unreal mode</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<dl><dt>Specifications</dt></dl>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-Mendelson_1989-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-Mendelson_1989_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Mendelson_1989_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFMendelson1989" class="citation magazine cs1"><a href="Edward_Mendelson" title="Edward Mendelson">Mendelson, Edward</a> (1989-12-12). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=5CmkZ3THZtwC&pg=PT170">"A Slot Full of RAM"</a>. <i><a href="PC_Magazine" class="mw-redirect" title="PC Magazine">PC Magazine</a></i>. Vol. 8, no. 21. <a href="Ziff_Davis_Publishing_Co." class="mw-redirect" title="Ziff Davis Publishing Co.">Ziff Davis Publishing Co.</a> pp. 169–. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200208221014/https://books.google.de/books?id=5CmkZ3THZtwC&lpg=PT171&pg=PT170&redir_esc=y">Archived</a> from the original on 2020-02-08<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-02-08</span></span>.</cite></span>
</li>
<li id="cite_note-FOLDOC-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-FOLDOC_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-FOLDOC_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1041539562">
/* start https://en.wikipedia.org/ */
.mw-parser-output .citation{word-wrap:break-word}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}
/* end https://en.wikipedia.org/ */
</style><span class="citation foldoc">This article is based on material taken from <a rel="nofollow" class="external text" href="https://foldoc.org/extended+memory">extended+memory</a> at the <i><a href="Free_On-line_Dictionary_of_Computing" title="Free On-line Dictionary of Computing">Free On-line Dictionary of Computing</a></i> prior to 1 November 2008 and incorporated under the "relicensing" terms of the <a href="GNU_Free_Documentation_License" title="GNU Free Documentation License">GFDL</a>, version 1.3 or later.</span></span>
</li>
<li id="cite_note-XMS2-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-XMS2_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-XMS2_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><a href="Microsoft" title="Microsoft">Microsoft</a>, <a href="Lotus_Software" title="Lotus Software">Lotus</a>, <a href="Intel" title="Intel">Intel</a>, and <a href="AST_Research" title="AST Research">AST Research</a> (1988-07-19). <a rel="nofollow" class="external text" href="http://www.phatcode.net/res/219/files/xms20.txt"><i>eXtended Memory Specification (XMS), version 2.0</i></a></span>
</li>
<li id="cite_note-XMS3-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-XMS3_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-XMS3_4-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-XMS3_4-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text">Microsoft, Lotus, Intel, and AST Research (January 1991). <a rel="nofollow" class="external text" href="http://www.phatcode.net/res/219/files/xms30.txt"><i>eXtended Memory Specification (XMS), version 3.0</i></a></span>
</li>
</ol></div></div>
<dl><dt>Microsoft Knowledge Base</dt></dl>
<ul><li><a rel="nofollow" class="external text" href="https://jeffpar.github.io/kbarchive/kb/037/Q37242/"><i>A General Tutorial on the Various Forms of Memory</i></a></li>
<li><a rel="nofollow" class="external text" href="https://jeffpar.github.io/kbarchive/kb/095/Q95555/"><i>Overview of Memory-Management Functionality in MS-DOS</i></a></li>
<li><a rel="nofollow" class="external text" href="https://jeffpar.github.io/kbarchive/kb/121/Q121008/"><i>Microsoft Diagnostic Utility: Definition of SXMS</i></a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://www.phatcode.net/articles.php?id=219">Extended Memory (XMS) Specification</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-10" href="https://en.wikipedia.org/wiki/?title=Extended_memory&oldid=1299823099">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>